import { createRouter, createWebHashHistory } from 'vue-router'
import Header from '@/components/Header.vue'

const router = createRouter({
  history: createWebHashHistory(),
  routes: [
    {
      path: '/lo',
      name: 'Lo',
      component: () => import('@/views/Lo.vue'),
    },
    {
      path:'/',
      component: () => import('@/components/scale/Base.vue'),
      // redirect:'/base/home',
      redirect:'/eighteen/equipment',
      // redirect:'/fortyThree/userInfo',
      children:[
        {
          path: '/login',
          name: 'Login',
          component: () => import('@/views/Login.vue'),
        },
      ]
    },
    // {
    //   path:'/base',
    //   component: () => import('@/components/scale/Base.vue'),
    //   redirect:'/base/home',
    //   children:[
    //     {
    //       component: Header,
    //       path: '/base',
    //       redirect:'/base/home',
    //       children: [
    //         {
    //           path: '/base/home',
    //           name:'Home',
    //           component: () => import('@/views/base/Home.vue')
    //         },
    //         {
    //           path: '/base/device',
    //           name: 'Device',
    //           component: () => import('@/views/base/Device.vue'),
    //         },
    //         {
    //           path: '/base/electricity',
    //           name: 'Electricity',
    //           component: () => import('@/views/base/Electricity.vue'),
    //         },
    //         {
    //           path: '/base/notice',
    //           name: 'Notice',
    //           component: () => import('@/views/base/Notice.vue'),
    //         },
    //         {
    //           path: '/base/chemical',
    //           name: 'Chemical',
    //           component: () => import('@/views/base/Chemical.vue'),
    //         },
    //         {
    //           path: '/base/behavior',
    //           name: 'Behavior',
    //           component: () => import('@/views/base/Behavior.vue'),
    //         },
    //       ]
    //     },
    //   ]
    // },
    // {
    //   path:'/fortyThree',
    //   component: () => import('@/components/scale/FortyThree.vue'),
    //   redirect:'/fortyThree/userInfo',
    //   children:[
    //     {
    //       path: '/fortyThree/competitionInfo',
    //       name: 'competitionInfo',
    //       component: () => import('@/views/fortyThree/CompetitionInfo.vue'),
    //     },{
    //       path: '/fortyThree/userInfo',
    //       name: 'userInfo',
    //       component: () => import('@/views/fortyThree/UserInfo.vue'),
    //     }
    //   ]
    // },
    {
      path:'/eighteen',
      component: () => import('@/components/scale/Eighteen.vue'),
      redirect:'/eighteen/equipment',
      children:[
        {
          path: '/eighteen/equipment',
          name: 'equipment',
          component: () => import('@/views/eighteen/Equipment.vue'),
        },
        {
          path: '/eighteen/equipmentGame',
          name: 'equipmentGame',
          component: () => import('@/views/eighteen/EquipmentGame.vue'),
        }
      ]
    }
  ],
})

export default router
